-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement OpenTelemetry tracing #1741
base: main
Are you sure you want to change the base?
Conversation
- Add basic telemetry and examples - Integrate with temporal's opentelemetry interceptor
@@ -0,0 +1,17 @@ | |||
package common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid creating many small packages, it doesn't really matter until intersubpackage dependencies get involved. go's naming also makes having common names like util, utils, common, etc a pain
Already had to resolve util/utils split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the call graph is like setup -> tracing/metrics/logging -> common, so had to create a separate one this time.
I'll also change it to otel_common for better visibility
ctx, span := trace.StartSpan(ctx, "connectors.GetCDCPullConnector") | ||
defer span.End() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can move this into GetAs, using reflect.TypeFor[T]
to put T in span label
@@ -112,12 +117,11 @@ require ( | |||
github.com/prometheus/common v0.53.0 // indirect | |||
github.com/prometheus/procfs v0.15.0 // indirect | |||
github.com/rogpeppe/go-internal v1.12.0 // indirect | |||
github.com/segmentio/asm v1.2.0 // indirect | |||
github.com/segmentio/asm v1.2.0 // indirect; indirectianian |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this tool generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird
To run/test:
Start any activity etc and we should start seeing traces like below:
TODOS: